First-in/first-out (FIFO) information protection and error detection method and apparatus

ABSTRACT

A system and method for determining data integrity as such data passes through a FIFO. A generator is provided for appending a bit in a predetermined bit location in each packet pushed into the FIFO in response clock signals. The appended bit is a function of the information pushed into the FIFO. A checker is provided for providing an indication of the information integrity in response to bits produced at an output of the FIFO in the predetermined bit location. In one embodiment, the generator is a parity generator and the checker is a parity checker. In one embodiment, during an initial test mode, one parity type is introduced into the FIFO by the parity generator and the opposite parity type is checked at the output of the FIFO by the parity checker to determine whether the parity checker is able to produce parity error signals. In another embodiment, the generator is a packet delimiter generator and the checker is a packet delimiter checker. In another embodiment, the generator is a frame delimiter generator and the checker is a frame delimiter checker

TECHNICAL FIELD

[0001] This invention relates to first-in/first-out register file (FIFO) error detection methods and apparatus.

BACKGROUND

[0002] As is known in the art, FIFOs are used extensively in digital systems such as computers, signal processors, etc. to pass data and/or control, i.e., information, from one part of the system to another. In these systems, it is important to confirm that the information introduced (“pushed” or written) into the FIFO is the same as the data received (“popped” or read) from the FIFO.

[0003] More particularly, a FIFO includes a plurality of storage stages. These storage stages may be a series of shift register stages or addressable stages. In either case, the information first written into the FIFO is the first information read from the FIFO. With a series of shift register stages, the information data is pushed into the input register stage in response to shift signals and any information previously residing in the FIFO is shifted into the next highest register stage, such shift signals being produced synchronous with a clock signal pushed into the FIFO. A “pop”, or read address is applied to the FIFO that points to the oldest data in the FIFO. It is also important to confirm that the correct amount of information is popped from the FIFO.

SUMMARY

[0004] In accordance with the present, a system and method for confirming the integrity of information passes through a FIFO. A generator is provided for appending a bit in a predetermined bit location in each packet pushed into the FIFO in response clock signals. The appended bit is a function of the information pushed into the FIFO. A checker is provided for providing an indication of the information integrity in response to bits produced at an output of the FIFO in the predetermined bit location.

[0005] In one embodiment, the generator is a parity generator and the checker is a parity checker.

[0006] In one embodiment, during an initial test mode, one parity type is introduced into the FIFO by the parity generator and the opposite parity type is checked at the output of the FIFO by the parity checker to determine whether the parity checker is able to produce parity error signals.

[0007] In another embodiment, the generator is a packet delimiter generator and the checker is a packet delimiter checker.

[0008] In another embodiment, the generator is a frame delimiter generator and the checker is a frame delimiter checker.

[0009] The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the invention will be apparent from the description and drawings, and from the claims.

DESCRIPTION OF DRAWING

[0010] The single Figure is a block diagram of a system for indicating the integrity of data as such data passes through a FIFO in accordance with the invention.

DETAILED DESCRIPTION

[0011] Referring now to the Figure, a system 10 is shown for indicating information, here data, integrity as such data passes through a FIFO 12. The FIFO 12 here includes a shift register section 14 having a plurality of successively coupling register stages 16 ₁-16 _(m). The data is pushed into input register stage 16, from a data source 18 and passes through such the stages of the shift register section 14 to an output register stage 16 _(m) in response to shift signals. The shift signals are produced in any conventional manner by a conventional FIFO controller 20 in response to a clock signal, CLK, pushed into the FIFO 12 by a clock 22. The output register stage 16 _(m) is coupled to a data destination 19.

[0012] More particularly, during normal operation, the data source 18 produces n bits of data, synchronous with the CLK signal. The data, here n bits, produced by the data source 18 are written into the FIFO 12, here designated as a data FIFO, in response to a PUSH_(—)1 command produced by a source controller 24 in a conventional manner. The written n bits are indicated by the designation “1”through “n” in stage 161 of the shift register section 14. During a read operation, a POP_(—)1 signal is produced by a source controller 24 in a conventional manner. A FIFO controller 20, in response to the POP_(—)1 command produces a POP_ENABLE signal and the read address, here stage 16 ₁-16 _(m), designation that points to address here, stage 16 ₁-16 _(m) storing the oldest data in the FIFO 12.

[0013] During normal operation, the n bits of data produced by the data source 18 are also pushed into a parity generator 24. Also fed to the parity generator 24 is the clock signal CLK. Either even or odd parity calculation are used as long as it is used consistently thoughout the process. There is one parity bit produced for each byte of data produced by the data source 18. Thus, there are n/8 parity bits produced, such bits being indicated by the designation “PTY ₁” through PTY_(a/8) in stage 16, of the shift register section 14.

[0014] Thus, if even parity is to be used, if the number of say logic 1 bits within a given data byte is an even number, then the generated parity is not asserted (i.e., here a logic 0 is associated with the given byte); otherwise, the parity is asserted (i.e., here a logic 1 is associated with the given byte). On the other hand, if odd parity is to be used, if the number of say logic 1 bits within a given data byte is an odd number, then the generated parity is not asserted (i.e., here a logic 0 is associated with the given byte); otherwise, the bit is asserted (i.e., here a logic 1 is associated with the given byte).

[0015] The parity produced at the output register stage 16 _(m) of shift register section 14 is checked by a parity checker 25, such parity checker 25 also being fed the data provided at the output register stage 16 _(m) of the FIFO 12 and the clock signal, CLK, as indicated. Thus, if the data pushed into the FIFO 12 has associated even parity, and the data popped out of the FIFO does not have associated even parity, an error is detected by the parity checker 25. Likewise, if the data pushed into the FIFO has associated odd parity, and the data popped out of the FIFO does not have associated odd parity, a parity error is detected by the parity checker 25. The parity error or lack thereof is indicated as an output of the parity checker 25. Thus, this parity mechanism ensures that each data byte has not been corrupted due to single, triple, quintuple, or septuple-bit electrical or logical faults.

[0016] Having both even/odd parity generation and even/odd parity checking capabilities provides a mechanism by which the integrity of the parity generation and checking circuits themselves can be verified.

[0017] This is accomplished as follows during an initial test mode: Odd parity is generated on the data from source 18 and pushed into the FIFO 12 with such data. Even parity is checked when the data and data parity are popped from the FIFO 12 in response to a POP_(—)1 command produced by a destination controller 30 in a conventional manner. If the parity generation and checking circuits 24, 25 are performing correctly, this action should produce a parity error associated with each and every data byte. Similarly, if even parity is generated on the data and pushed into the FIFO with the data and odd parity is checked when the data and data parity are popped from the FIFO, then this action should produce a parity error associated with each and every data byte. This action verifies that the parity generator 32 and parity checker 25 do not have “stuck-at” electrical faults or logical implementation errors. The test mode determines whether the checker 25 is able to produce a proper parity error signal.

[0018] Referring again to the normal operating mode subsequent to the initial test mode, the data, data parity, packet delimiter (to be described), and frame delimiter information (to be described) that is pushed into the FIFO 12 in one clock (CLK) cycle is referred to as a packet. Thus, it is noted that the packet indicted in stage 16, from source 18, the n/8 parity bits PTY₁ through PTY_(n/8), a packet delimiter bit, to be described, in the MSB-1 bit position and a frame delimiter bit to be described in the MSB bit position. A set of one or more packets is referred to as a frame. Thus, the packets within a frame are pushed into the FIFO 12 on successive clock cycles.

[0019] The system 10 includes a packet delimiter generator 26. The packet delimiter generator 26 responds to the clock signal, CLK, and the PUSH_(—)1 signal produced by the source controller 24 each time a packet of data from source 12 is to be stored in the input register stage 16, of the shift register section 14. That is, the PUSH_(—)1 signal is a control signal that indicates that the source controller 24 is attempting to write data into the FIFO 12. The packet delimiter generator 26 appends a tag to the data from source 12 and the parity bits produced by the parity generator 24. A given packet delimiter tag has a value that is different from the value appended by the packet delimiter generator 26 to the adjacent packets.

[0020] Thus, the packet delimiter generator 26 creates a tag, synchronous with the clock signal, CLK. The logic value of the tag alternates with each packet successively pushed into the input register stage 161. Each packet is, as noted above, pushed into the input register stage 16, of the shift register section 14 in response to a clock signal, CLK. In the example shown in the FIGURE, the tag is pushed into a predetermined bit location MSB-1 where the bit position MSB is the most significant bit position of each stage of the shift register section 14. Thus, it is noted that the logic value of the tag in every other one of the register stages, here stages 161, 163, and 165 are the same logic value, i.e., logic value 1 while the intermediate stages, here stages 162, 164, are the same logic value, i.e., logic value 0.

[0021] The system includes a packet delimiter checker 28 that is coupled to the output register stage 16 _(m) of the MSB-1 of the shift register section 14. The FIFO controller 20 is fed the POP_ENABLE signal produced by the FIFO controller 20 in response to a POP_(—)1 signal produced by the destination controller in any conventional manner. The POP_ENABLE signal is a control signal that indicates that the destination controller 30 is attempting to read data from the FIFO 12.

[0022] The packet delimiter checker 28 provides an indication of the whether the logic value of the tag alternates as such data is successively popped from the FIFO 12, synchronous with the clock signal, CLK. Thus, if the logic value of the tag alternates when successive pops are executed, there is no packet error produced by the packet delimiter checker 28; otherwise, an error signal is produced at the output of the packet delimiter checker 28.

[0023] Thus, it is noted that with packet delimiter generation by packet delimiter generator 26, the FIFO 12 generates a single-bit packet delimiter for each packet that is pushed into the FIFO 12 by the source generator 24. The value is stored in the MSB-1 bit position of the packet. As noted above, the logic value for this delimiter is the opposite of the delimiter value that was generated for the previous packet. Thus, the logic pattern that the FIFO 12 generates for the delimiter for successive pushed packets is 01010101, etc. The packet delimiter bit is part of the packet that is pushed into the FIFO 12.

[0024] When the destination controller 30 pops a packet from the FIFO 12, the packet delimiter checker 28 checks the logic value of the packet delimiter tag to check whether it is the opposite of the packet delimiter value in the previous packet that was popped from the FIFO 12. If the logic value for the delimiter tag in two adjacent packets is the same, then the FIFO 12 reports a packet error.

[0025] This packet delimiter mechanism attempts to ensure that the FIFO 12 did not erroneously overwrite a previously pushed packet. Since half of the packets contain a delimiter that has a logic value 1 and the other half contain a logic value 0, this mechanism can detect half of the potential FIFO addressing errors.

[0026] The system 10 also includes a frame delimiter generator 32. The frame delimiter generator 32 appends a tag to each packet within a frame in response to an END Of FRAME signal produced by the source controller 24. The tag, here a bit, is fed to the MSB bit position of the packet. Within a frame, a frame delimiter tag has a value that is different from the tag value of the frame delimiters in the adjacent frames.

[0027] More particularly, a frame delimiter generator 32 is provided for appending a tag in a predetermined bit location, here the MSB position, for each packet of the data pushed into the input register stage 16 ₁ synchronous with the clock signal, CLK. The appended tag has the same logic value for each packet within the frame. The appended tag alternates in logic value for successive frames pushed into the input register stage 16 ₁ of the shift register section 14. Each one of the frames is comprised of at least one packet of the data. Each one of the packets of data is pushed into the input register stage 161 of the shift register, synchronous with the clock signal, CLK. Thus, in the example shown in the Figure, frame p contains a set of two packets. The frame delimiter tag has a value of logic 0 for each of the two packets in such frame, p; the succeeding frame p+1 contains a set of two packets where the frame delimiter tag has a value of logic 1 for each of the two packets in such frame, p+1; and the next succeeding frame p+2 contains a single packet where the frame delimiter tag has a value of logic 0 for the packet in such frame, p+2.

[0028] The system 10 includes a frame delimiter checker 42 for providing an indication of the whether the logic values of the tag produced at the output register stage 16 _(m) in the predetermined bit location for one of the frames pushed into the input stage of the shift register alternates from the succeeding one of the frames, such frames being successively produced at the output stage in response to the clock signals.

[0029] More particularly, the frame delimiter checker 42 provides an indication of whether the logic values of the tag produced at the output register stage 16 _(m) in the predetermined bit location, here the MSB location, for one of the frames pushed into the input stage 16, of the shift register section 14 alternates from the succeeding one of the frames, such frames being successively produced at the output stage 16 _(m), synchronous with the clock signal, CLK.

[0030] The system includes a second FIFO 40 fed frame size data by the source controller 24. The second FIFO is designated as a control FIFO and is identical in construction to the data FIFO 12. Here, however, the second FIFO 40 is not fed a frame delimiter tag and hence the MSB bit of FIFO 40 is not used. The pop (i.e., write) and push (i.e., read) signals fed to the second FIFO are designated POP_(—)2 and PUSH_(—)2, respectively, and are produced by the source controller 24 and the destination controller 30, respectively, as indicated.

[0031] The frame size data passes through the second FIFO 40 in response to the clock signals CLK. The frame delimiter checker 42 in response to the frame size data passed thereto through the second FIFO 40.

[0032] More particularly, with frame delimiting, the frame delimiter generator 32 generates a single-bit frame delimiter for each frame that is pushed into the FIFO 12 by the source controller 24. The source controller 32 provides a signal to the destination controller 30 that indicates when the frame ends, i.e., a multi-bit frame word indicating the size, that is, the number of packets in a frame. This multi-bit word of frame size information is fed by the source controller 24 to the second FIFO 40. More particularly, the frame size information is pushed into the second FIFO 40 which responds to the clock signals as FIFO 12.

[0033] The logic value for a generated frame delimiter produced by frame delimiter generator 32 at the end of each frame is the opposite of the frame delimiter value generated by the generator 32 for the previous frame. Thus, the logic pattern that the frame delimiter generator 32 generates for the delimiter tags for successive pushed frames is 01010101, etc. The frame delimiter tag is contained in each packet that is pushed into the FIFO 12.

[0034] The frame delimiter checker 42 is responsive to an end of frame signal produced by the destination controller 30 in response to the frame size information such controller 30 receives from the second FIFO 40. In response to such end of frame signal and clock signals CLK, the frame delimiter checker 42 verifies that the logic value of the frame delimiter remains constant for all packets within a frame. Thus, the source controller 30 provides an end-of-frame signal to the destination controller 30 that indicates when the destination controller 30 should expect the frame to end. If the frame delimiter checker 42 detects that the frame delimiter value varies within the frame, the frame delimiter checker 42 reports a frame error. The frame delimiter checker 42 also verifies that the frame delimiter value in a given frame is the opposite of the frame delimiter value in the previous frame that was popped from the FIFO 12. If the logic value for the delimiter in two adjacent frames is the same, then the frame delimiter checker 42 reports a frame error.

[0035] The frame delimiter mechanism ensures that the source controller 24 and the destination controller 30 are in agreement as to the size of the frames (the number of packets in each frame).

[0036] It is also noted that the FIFO 12 includes a push checker 50 and a pop checker 52. The push checker 50 is responsive to the PUSH_1 signal and the address produced by the FIFO controller 20. With this arrangement, the push checker 50 reports a push error when the source controller 24 attempts to push a packet into a FIFO that is full, i.e., when there are no addresses available. This mechanism ensures that the FIFO will not drop a packet without an error being reported.

[0037] Likewise, the pop checker 52 is responsive to the POP_2 signal and the address produced by the FIFO controller 20. With this arrangement, the pop checker 52 reports a pop error when the destination controller 30 attempts to pop a packet from a FIFO that is empty, i.e., when all addresses are available. This mechanism helps to ensure that the source controller 24 and the destination controller 30 are in agreement about the size of the frames.

[0038] By employing all of the above FIFO data integrity mechanisms simultaneously and continuously, the integrity of the data that is pushed into and popped from the FIFO is greatly enhanced.

[0039] Thus, the system 10 uses several mechanisms to ensure the integrity of the data provided by the FIFO 12 to the user of such data. These mechanisms, described above, are:

[0040] 1. parity generation and checking

[0041] 2. packet delimiter generation and checking

[0042] 3. frame delimiter generation and checking

[0043] 4. push and pop checking.

[0044] A number of embodiments of the invention have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the invention. Accordingly, other embodiments are within the scope of the following claims. 

What is claimed is:
 1. A system for determining information integrity as such information passes through a FIFO, comprising: a generator for appending a bit in a predetermined bit location in each packet pushed into the FIFO in response to a clock signal, such appended bit being a function of the information pushed into the FIFO; and a checker for providing an indication of the information integrity in response to bits produced at an output of the FIFO in the predetermined bit location.
 2. The system recited in claim 1 wherein the generator is a parity generator and the checker is a parity checker.
 3. The system recited in claim 1 wherein the generator is a packet delimiter generator and the checker is a packet delimiter checker.
 4. The system recited in claim 1 wherein the generator is a frame delimiter generator and the checker is a frame delimiter checker.
 5. A system for determining information integrity as such information passes through a FIFO, comprising: a packet delimiter generator for appending a bit in a predetermined bit location of each packet of the information pushed into the FIFO in response to a clock signal, such appended bit alternating in logic value for packet of the information successively pushed into the FIFO, each one of the packets of information being pushed into the FIFO in response to clock signals; and a packet delimiter checker for providing an indication of the whether the logic value of the bits produced at an output of the FIFO in the predetermined bit location alternates as such information is successively produced at the output stage in response to the clock signal.
 6. A system for indicating data integrity as such data passes through a FIFO, comprising: a frame delimiter generator for appending a bit in a predetermined bit location of each packet of the data pushed into the FIFO in response to clock signals, such appended bit having the same logic value for each frame of the data, such appended bit alternating in logic value for frames of the data successively pushed into the FIFO, each one of the frames comprising at least one packet of the data, each one of the packets of data being pushed into the FIFO in response to a clock signal; and a frame delimiter checker for providing an indication of the whether the logic values of the bits produced at an output of the FIFO in the predetermined bit location for one of the frames pushed into the FIFO alternates from the succeeding one of the frames such frames are successively produced at the output of the FIFO in response to a plurality of the clock signals.
 7. The system recited in claim 6 including a second FIFO fed frame size data and wherein such frame size data passes through the second FIFO in response to the clock signals, and wherein the frame delimiter checker is response to the frame size data passed thereto through the second FIFO.
 8. A method for indicating information integrity as such data passes through a FIFO, comprising: feeding the information to the FIFO; appending a bit in a predetermined bit location of each packet of the information pushed into the FIFO in response to a clock signal, such appended bit being a function of the information pushed into the FIFO; and providing an indication of the information integrity on response to bits produced at an output one of the FIFO in the predetermined bit location.
 9. The method recited in claim 9 wherein the appending comprises appending a parity and wherein the indication providing comprises checking the parity.
 10. The method recited in claim 9 wherein the appending comprises appending a packet delimiter bit and the indication providing comprises examining the appended packet delimiter bit.
 11. The method recited in claim 9 wherein the appending comprises appending a frame delimiter set of bits and the indication providing comprises examining the appended set of frame delimiter bits.
 12. A method for indicating information integrity as such information passes through a FIFO, comprising: feeding the information to a FIFO; appending a bit in a predetermined bit location of each packet of the information pushed into the FIFO in response to a corresponding one of a plurality of clock signals, such appended bit alternates in logic value for packet of the information successively pushed into the FIFO, each one of the packets of data being pushed into the FIFO in response to a corresponding one of the clock signals; providing an indication of the whether the logic value of the bits produced at an output of the FIFO in the predetermined bit location alternates as such information is successively produced at the output of the FIFO in response to the clock signals.
 13. A method for indicating data integrity as such data passes through a FIFO, comprising: feeding the data to a FIFO; appending bits in a predetermined bit location of each packet of the data pushed into the FIFO in response to a corresponding one of a plurality of clock signals, such appended bit having the same logic value for each frame of the data, such appended bits alternating in logic value for frames of the data successively pushed into the FIFO, each one of the frames comprising a at least one packet of the data, each one of the packets of data being pushed into the FIFO in response to a corresponding one of the clock signals; providing an indication of the whether the logic values of the bits produced at an output of the FIFO in the predetermined bit location for one of the frames pushed into the FIFO alternates from the succeeding one of the frames such frames are successively produced at the output of the FIFO in response to the clock signals.
 14. The method recited in claim 13 including wherein frame size data passes through a second FIFO in response to the clock signals, and wherein the indication providing comprises responding to the frame size data passed thereto through the second FIFO.
 15. A method for testing a FIFO, comprising: introducing one parity type into the FIFO by a parity generator; and checking for an opposite parity type at an output of the FIFO by a parity checker to determine whether the parity checker is able to produce parity error signals.
 16. A method for testing a FIFO, comprising: comparing a read command fed to the FIFO by a destination controller with an address produced by the FIFO in response to such read command to determine whether all addresses in the FIFO are available.
 17. A method for testing a FIFO, comprising: comparing a write command fed to the FIFO by a source controller with an address produced by the FIFO in response to such write command to determine where an attempt is being made to write a packet of information into the FIFO when there are no addresses available in the FIFO 